/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.magri.aula2.exercicio4;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Magri
 */
public class ControleRemoto {
    
    IAparelhoEletronico tvTubao = new Televisao("Sharp", "Color tv 315");
    
    IAparelhoEletronico dvdCoby = new DVDPlayer("Coby", "LIXAO - II");
    
    IAparelhoEletronico poly = new Polystation();
    
    public ControleRemoto() {
    }
    
    public void apertarBotoes() {
        tvTubao.ligar();
        dvdCoby.ligar();
        
        tvTubao.retrocederCanal();
        
        tvTubao.aumentarVolume();
        tvTubao.aumentarVolume();
        tvTubao.aumentarVolume();
        tvTubao.aumentarVolume();
        
        dvdCoby.play();
        
        dvdCoby.aumentarVolume();
        dvdCoby.aumentarVolume();
        
        
        System.out.println(tvTubao);
        System.out.println(dvdCoby);
        
        //dvdCoby.adiantarCanal();
        
        dvdCoby.stop();
        
        
        dvdCoby.desligar();
        //tvTubao.desligar();
        
        
        
        System.out.println();
        System.out.println(tvTubao);
        System.out.println(dvdCoby);
        
        
        
        poly.ligar();
        
        System.out.println(poly);
        
        try {
            Thread.sleep(1000);
        } catch (InterruptedException ex) {
            Logger.getLogger(ControleRemoto.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        poly.play();
        
    }
    
    public static void main(String[] args) {
        ControleRemoto controleUniversao = new ControleRemoto();
        controleUniversao.apertarBotoes();
    }
}
